package service;

import domain.Comment;
import java.util.List;

import exceptions.GeneralServiceException;

import domain.User;
import domain.UserRole;

/**
 *
 * @author yuyok
 */
public interface IUserService extends IGenericService<User> {

    /**
     * Getting user by its login and password
     * 
     * @param login
     *            User login
     * @param password
     *            User password
     * @return Found user or <code>null</code>
     * @throws IllegalArgumentException
     *             if params are <code>null</code>
     */
    public User getUserByLoginAndPassword(String login, String password)
            throws IllegalArgumentException;

    public User getUserByLogin(String login)
            throws IllegalArgumentException;

    public List<User> getUsersByRole(UserRole role) throws IllegalArgumentException;

    public List<Comment> getCommentsByUserLogin(String login) throws IllegalArgumentException;

    public User register(User user) throws IllegalArgumentException, GeneralServiceException;

    public void confirmUser(String login);

    public void addNewSupplier(User user) throws IllegalArgumentException;
    
    public List<User> getAllUsers();
}
